package ontology;



import java.util.EnumSet;

public enum HivProt {
	
	TAT("NP_057853.1"),
	ENV_GP120("NP_579894.2"),
	ENV_GP41("NP_579895.1"),
	ENV_GP160("NP_057856.1"),
	NEF("NP_057857.2"),
	VIF("NP_057851.1"),
	POL("NP_789740.1"),
	CAPSID("NP_579880.1"),
	NUCLEOCAPSID("NP_579881.1"),
	INTEGRASE("NP_705928.1"),
	REV_TRANS("NP_705927.1"),
	GAG("NP_057850.1"),
	VPU("NP_057855.1"),
	VPR("NP_057852.2"),
	RETROPEPSIN("NP_705926.1"),
	P6("NP_579883.1"),
	P1("NP_787042.1"),
	MATRIX("NP_579876.2"),
	REV("NP_057854.1");
	
	private final String accession;
	
	private HivProt(String accession){
		this.accession = accession;
	}

	public static HivProt getProtByAccession(String accession) {
		for(HivProt p : EnumSet.allOf(HivProt.class)){
			if(p.getAccession().equalsIgnoreCase(accession)){
				return p;
			}
		}
		System.out.println("Error identifying HIV protein accession: "+accession);
		return null;
	}

    public static HivProt getProtByName(String name) {
		for(HivProt p : EnumSet.allOf(HivProt.class)){
			if(p.name().equalsIgnoreCase(name)){
				return p;
			}
		}
		System.out.println("Error identifying HIV protein accession: "+name);
		return null;
	}

	public String getAccession() {
		return accession;
	}

	
	
	
	

}
